<template>
    <div class="common-layout">
        <el-container>
            <el-header>
                <Header />
            </el-header>
            <el-container>
                <el-aside width="200px">
                    <Nav />
                </el-aside>
                <el-main>
                    <Breadcrumb />
                    <div class="scroll-area">
                        <RouterView />
                    </div>
                </el-main>
            </el-container>
        </el-container>
    </div>
</template>

<script setup lang="ts">
import Header from '@/components/Header.vue';
import Nav from '@/components/Nav.vue';
import Breadcrumb from "@/components/Breadcrumb/index.vue";
</script>

<style lang="less" scoped>
.el-header {
    background-color: #409eff;
    height: 60px;
}

.el-aside {
    background-color: #304156;
    height: calc(100vh - 60px);

    // css3的伪类选择器，可以控制滚动条的样式
    &::-webkit-scrollbar {
        width: 0;
    }
}

.el-main {
    background-color: white;
    height: calc(100vh - 60px);
    color: black;
    height: calc(100vh - 70px);

    .scroll-area {
        height: calc(100vh - 145px);
        overflow: auto;

        &::-webkit-scrollbar {
            width: 0;
        }
    }
}
</style>